#ifndef MANAGEFORM_H
#define MANAGEFORM_H

#include <QWidget>
#include "ui_manageform.h"
#include <QGraphicsBlurEffect>
#include "manageformtitle.h"


enum NChosseResult
{
    NID_OK = 0,
};

enum StType
{
    S_REG = 0,                      //注册
    S_STUCK,                        //解卡
    S_PASS                          //改密
};

class ManageForm : public QWidget
{
    Q_OBJECT

public:
    ManageForm(QWidget *parent = Q_NULLPTR);
    ~ManageForm();

    NChosseResult ShowForm();

    int SetRandom(int Min, int Max);
    void ShowWidget(StType Typ);
    bool IsCha(QString &QStr);
    bool IsEnglishOrNumber(QString &QStr);
    void SetTextComplete(QString Text1, QString Text2);
    void ResetEditTextCode();
    void SetRadioFruits(StType Typ);

private slots:
    void OnYesClicked();
    void OnNCloseClicked();
    void OnNRadioClickFruits();

signals:
    void EmitFuncSendTcpData(QString Data);

private:
    Ui::ManageForm ui;

    void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;

    NChosseResult NResult;
    ManageFormTitle* DoTitleBar;
    QButtonGroup *NGroupFruits;
    QEventLoop* EventLoop;
    QString InitCode;
};
#endif
